package net.towee.client.event.core;

import net.towee.model.account.Board;

import com.google.gwt.event.shared.GwtEvent;

public class GroupDetachedFromBoardEvent extends GwtEvent<GroupDetachedFromBoardHandler> {
	public static Type<GroupDetachedFromBoardHandler> TYPE = new Type<GroupDetachedFromBoardHandler>();
	private final String groupId;
	private final Board board;

	public GroupDetachedFromBoardEvent(String groupId, Board b) {
		this.groupId = groupId;
		this.board = b;
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<GroupDetachedFromBoardHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(GroupDetachedFromBoardHandler handler) {
		handler.onGroupDetachedFromBoard(groupId, board);
	}

}
